﻿/* DotNetHoldem 
 * .Net Solution that allows to use OpenHoldem with .Net logic
 * Author: Óscar Andreu
 * oesido at gmail dot com
 * Licensed under GPLv3 - 2012
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DotNetBotLogic.Controllers;
using DotNetBotLogic.Enums;

namespace DotNetBotLogic.Classes.BetRoundClasses.NL6Max
{
    internal class CallPreflopNL6 : BetRoundBase
    {
        #region Variables

        //The meaning is that lists 10x goes till 106
        private KeyValuePair<string, int> list10x = new KeyValuePair<string, int>("islist10", 6);

        #endregion

        #region Constructor

        internal CallPreflopNL6(BaseController ctrl)
            : base(ctrl)
        {
            this.ctrl = ctrl;
        }

        #endregion

        internal override double getAction()
        {
            actionResult = 0;
            double call = OhHelper.GetSymbol(Symbols.call);

            if (NumberOpponentsRaisingPreflop() > 0)
            {
                if (IsInLists(list10x, 6) && call <= BaseController.BBlind * 15 )
                {
                    actionResult = 1;
                    //Logger.Log("swag -- list106-list106 UTG 15 bb");
                }
                else if (IsInLists(list10x, 5) && call <= BaseController.BBlind * 8)
                {
                    actionResult = 1;
                    //Logger.Log("swag -- list105-list106 MiddlePosition 8 bb");
                }
                else if (IsInLists(list10x, 4) && call <= BaseController.BBlind * 5)
                {
                    actionResult = 1;
                    //Logger.Log("call -- list104-list106 Cutoff 5 bb");
                }

            }

            return actionResult; ;
        }
    }
}
